import Vue from 'vue'
import Vuex from 'vuex'

import state from './state'
import actions from './actions'
import mutations from './mutations'


import VuexPersistence from 'vuex-persist'

Vue.use(Vuex)



const vuexLocal = new VuexPersistence({
    storage: window.sessionStorage
})

// 对外输出vuex的store对象
export default new Vuex.Store({
    state,
    actions,
    mutations,
    plugins: [vuexLocal.plugin]
})
  